#include <unistd.h>
#include <fcntl.h>
#include <arpa/inet.h>
#include <sys/types.h>          /* See NOTES */
#include <sys/socket.h>
#include <string.h>

#include <string>

class TcpSocket{
    private:
	bool islocal;    //false AF_INET  true AF_UNIX
        struct sockaddr_in servAddr;
        int port;
        std::string ipaddr;
        std::string socketfile;
        int fd;

    public:
	TcpSocket(int port);
	TcpSocket(int port,const char * ipaddr);
	TcpSocket(const char * socketfile);
		
	bool isLocalSocket();
	int getSocketFd();
		
	

};


